﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;

namespace MyVocationSpace
{
    public partial class AddTopic : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            BAL.conn.connectionString = ConfigurationManager.ConnectionStrings["connectionstring"].ConnectionString;

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                string title = txtTitle.Text;
                string des = txtDes.Text;

                int IDTopic = BAL.Topics.CreateTopic(1, 1, title, des);
                idSpanMsg.Style.Add("display", "block");
                idSpanMsg.InnerHtml = "New Topic Added Successfully";
            }
        }
    }
}